Integrand size = 32, antiderivative size = 88 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=\frac {c^2 \text {arctanh}(\sin (e+f x))}{a^2 f}-\frac {2 c^2 \tan (e+f x)}{f \left (a^2+a^2 \sec (e+f x)\right )}+\frac {2 \left (c^2-c^2 \sec (e+f x)\right ) \tan (e+f x)}{3 f (a+a \sec (e+f x))^2} \]
c^2*arctanh(sin(f*x+e))/a^2/f-2*c^2*tan(f*x+e)/f/(a^2+a^2*sec(f*x+e))+2/3* (c^2-c^2*sec(f*x+e))*tan(f*x+e)/f/(a+a*sec(f*x+e))^2
Time = 0.16 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.24 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=\frac {c^2 \left (-\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}+\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}-\frac {4 \tan \left (\frac {1}{2} (e+f x)\right )}{3 f}-\frac {2 \sec ^2\left (\frac {1}{2} (e+f x)\right ) \tan \left (\frac {1}{2} (e+f x)\right )}{3 f}\right )}{a^2} \]
(c^2*(-(Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]]/f) + Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]/f - (4*Tan[(e + f*x)/2])/(3*f) - (2*Sec[(e + f*x)/2]^ 2*Tan[(e + f*x)/2])/(3*f)))/a^2
Time = 0.49 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3042, 4445, 3042, 4445, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a \sec (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4445 |
\(\displaystyle \frac {2 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )}{3 f (a \sec (e+f x)+a)^2}-\frac {c \int \frac {\sec (e+f x) (c-c \sec (e+f x))}{\sec (e+f x) a+a}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )}{3 f (a \sec (e+f x)+a)^2}-\frac {c \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )}{\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx}{a}\) |
\(\Big \downarrow \) 4445 |
\(\displaystyle \frac {2 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )}{3 f (a \sec (e+f x)+a)^2}-\frac {c \left (\frac {2 c \tan (e+f x)}{f (a \sec (e+f x)+a)}-\frac {c \int \sec (e+f x)dx}{a}\right )}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )}{3 f (a \sec (e+f x)+a)^2}-\frac {c \left (\frac {2 c \tan (e+f x)}{f (a \sec (e+f x)+a)}-\frac {c \int \csc \left (e+f x+\frac {\pi }{2}\right )dx}{a}\right )}{a}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {2 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )}{3 f (a \sec (e+f x)+a)^2}-\frac {c \left (\frac {2 c \tan (e+f x)}{f (a \sec (e+f x)+a)}-\frac {c \text {arctanh}(\sin (e+f x))}{a f}\right )}{a}\) |
(2*(c^2 - c^2*Sec[e + f*x])*Tan[e + f*x])/(3*f*(a + a*Sec[e + f*x])^2) - ( c*(-((c*ArcTanh[Sin[e + f*x]])/(a*f)) + (2*c*Tan[e + f*x])/(f*(a + a*Sec[e + f*x]))))/a
3.1.45.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[2*a*c*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^(n - 1)/(b*f*(2*m + 1))), x] - Simp[d*((2*n - 1)/(b*(2*m + 1))) Int[Csc[e + f*x]*(a + b*Csc[e + f* x])^(m + 1)*(c + d*Csc[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[n, 0] && LtQ[m, -2^ (-1)] && IntegerQ[2*m]
Time = 0.83 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.74
method | result | size |
derivativedivides | \(\frac {2 c^{2} \left (-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}+\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}\right )}{f \,a^{2}}\) | \(65\) |
default | \(\frac {2 c^{2} \left (-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}+\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}\right )}{f \,a^{2}}\) | \(65\) |
parallelrisch | \(\frac {c^{2} \left (-2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+3 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )-3 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a^{2} f}\) | \(65\) |
risch | \(-\frac {8 i c^{2} \left (3 \,{\mathrm e}^{i \left (f x +e \right )}+1\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}+\frac {c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a^{2} f}-\frac {c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{a^{2} f}\) | \(87\) |
norman | \(\frac {-\frac {2 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {10 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 a f}-\frac {2 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{3 a f}-\frac {2 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{3 a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{2} a}+\frac {c^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a^{2} f}-\frac {c^{2} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{a^{2} f}\) | \(153\) |
2/f/a^2*c^2*(-1/3*tan(1/2*f*x+1/2*e)^3-tan(1/2*f*x+1/2*e)-1/2*ln(tan(1/2*f *x+1/2*e)-1)+1/2*ln(tan(1/2*f*x+1/2*e)+1))
Time = 0.28 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.57 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=\frac {3 \, {\left (c^{2} \cos \left (f x + e\right )^{2} + 2 \, c^{2} \cos \left (f x + e\right ) + c^{2}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left (c^{2} \cos \left (f x + e\right )^{2} + 2 \, c^{2} \cos \left (f x + e\right ) + c^{2}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 8 \, {\left (c^{2} \cos \left (f x + e\right ) + 2 \, c^{2}\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \]
1/6*(3*(c^2*cos(f*x + e)^2 + 2*c^2*cos(f*x + e) + c^2)*log(sin(f*x + e) + 1) - 3*(c^2*cos(f*x + e)^2 + 2*c^2*cos(f*x + e) + c^2)*log(-sin(f*x + e) + 1) - 8*(c^2*cos(f*x + e) + 2*c^2)*sin(f*x + e))/(a^2*f*cos(f*x + e)^2 + 2 *a^2*f*cos(f*x + e) + a^2*f)
\[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=\frac {c^{2} \left (\int \frac {\sec {\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {2 \sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx\right )}{a^{2}} \]
c**2*(Integral(sec(e + f*x)/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + I ntegral(-2*sec(e + f*x)**2/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + In tegral(sec(e + f*x)**3/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x))/a**2
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (87) = 174\).
Time = 0.22 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.23 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=-\frac {c^{2} {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}}\right )} + \frac {2 \, c^{2} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}} - \frac {c^{2} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \]
-1/6*(c^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 - 6*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a^2 + 6*log(si n(f*x + e)/(cos(f*x + e) + 1) - 1)/a^2) + 2*c^2*(3*sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2 - c^2*(3*sin(f*x + e)/ (cos(f*x + e) + 1) - sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/a^2)/f
Time = 0.31 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.01 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=\frac {\frac {3 \, c^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{2}} - \frac {3 \, c^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{2}} - \frac {2 \, {\left (a^{4} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 3 \, a^{4} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a^{6}}}{3 \, f} \]
1/3*(3*c^2*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a^2 - 3*c^2*log(abs(tan(1/2* f*x + 1/2*e) - 1))/a^2 - 2*(a^4*c^2*tan(1/2*f*x + 1/2*e)^3 + 3*a^4*c^2*tan (1/2*f*x + 1/2*e))/a^6)/f
Time = 13.04 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.52 \[ \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{(a+a \sec (e+f x))^2} \, dx=-\frac {2\,c^2\,\left (3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )-3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\right )}{3\,a^2\,f} \]